<!DOCTYPE html>
<html lang="en">
<head>
    <title>${.title}</title>
    ${include "macro/gcss"}
</head>
<body>
<form class="layui-form padding-t" action="">
    <input type="hidden" name="code" value="${.code}"/>
    ${- range .fieldList}
    <div class="layui-form-item">
        <label class="layui-form-label">${.ZhName}:${- if .Required}<span class="color-red font-weight">*</span>${- end}</label>
        <div class="layui-input-block">
            ${- if eq "input" .Dom}
            <input type="text" name="${.EnName}" ${- if .Required}required lay-verify="required" ${- end}
                   placeholder="请输入${.ZhName}"
                   autocomplete="off" class="layui-input"/>
            ${- else if eq "switch" .Dom}
            <input name="${.EnName}" type="checkbox" checked lay-skin="switch" lay-text="是|否">
            ${- else if eq "textarea" .Dom}
            <textarea placeholder="请输入${.ZhName}" class="layui-textarea" name="${.EnName}"></textarea>
            ${- end}
        </div>
    </div>
    ${- end}
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="btn_add">提 交</button>
            <button id="rest-btn" type="reset" class="layui-btn layui-btn-warm dis-none">
                重置
            </button>
        </div>
    </div>
</form>
${include "macro/gjs"}
<script type="text/javascript" src='${LookupPath "/static/js/crud/add.js"}'></script>
</body>
</html>